<?php

namespace App\Http\Requests\Auth;

use App\Http\Requests\BaseRequest;

class RegisterRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'username' => 'required|max:16',
            'password' => 'required|min:6|max:16|confirmed',
        ];
    }

    public function messages()
    {
        return [
            'username.required' => '用户名不能为空',
            'username.max' => '用户名不能超过16个字符',
            'password.required' => '密码不能为空',
            'password.min' => '密码不能低于6个字符',
            'password.max' => '密码不能超过16个字符',
        ];
    }
}
